feat(core): add Swift tree-sitter support#537
Merged
Conversation
502dc4d to
bbbd6db
Compare
Collaborator
|
Thanks for your PRs, merged them. Awesome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
swiftConfiginto the tree-sitter loaderSwiftExtractorcoverage for Swift type containers, functions/methods, visibility, imports/exports, and call graph extractionPackage.swifttarget paths, so Swift test targets can connect to source targetsScope
This PR is intentionally Swift-only. The Windows CI skill-test fix is kept separate in #538.
CI note
Ubuntu passes on this branch. The current Windows failure is caused by existing Windows skill-test issues in
mainthat are fixed by #538, not by the Swift extractor changes. Recommended order: merge #538 first, then update/rebase this PR so #537 can rerun on the fixed Windows CI baseline.Why
Swift files were previously scanned as code but had no tree-sitter grammar/extractor, so
.swiftfiles produced empty structural analysis and no useful graph nodes/edges. This addresses the Swift side of #226 and follows the workspace-vendored WASM pattern used after #435, avoiding the third-party bundle approach from #344.Local tests
corepack pnpm --filter @understand-anything/core buildcorepack pnpm --filter @understand-anything/core testcorepack pnpm exec vitest run tests/skill/understand/test_extract_import_map.test.mjs tests/skill/understand/test_scan_project.test.mjs